const { MongoClient } = require('mongodb');
async function main() {
  const client = await MongoClient.connect('mongodb://localhost:27017');
  const db = client.db('smartwear');
  await db.collection('users').insertOne({
    openid: 'test_openid_001',
    gender: 'male',
    age: 25,
    satisfaction: 4.5
  });
  console.log('users 集合已创建并插入一条数据');
  await client.close();
}
main();
